package com.logistics.utils.socket;

import lombok.Data;

import java.io.Serializable;
import java.util.Map;

@Data
public class EventData<T> implements Serializable {

    private String eventName;

    private T data;

    public EventData(){

    }

    public EventData(String eventName, T data) {
        this.eventName = eventName;
        this.data = data;
    }

    public static <T> EventData<T> build(String eventName, T data) {
        return new EventData<T>(eventName, data);
    }
}
